<template>
  <div>
    <SearchTableTemplate ref="searchTableTemplate" :table-list-api="$apis.demo.queryByPage" :extra-params="extraParams" page-key="pageNum" page-size-key="pageSize" :label-width="'120px'" :stt-config="sttConfig" v-model:selectionItems="selectionItems" />
  </div>
</template>

<script setup>
import { ref, watch } from "vue";
import SearchTableTemplate from "@/components/search-table-template/SearchTableTemplate.vue";
console.log('SearchTableTemplate', SearchTableTemplate)
const extraParams = {}
const selectionItems = ref([])

const sttConfig = ref({
  search: [
    {
      type: "input",
      label: "操作对象id：",
      placeholder: "请输入",
      prop: "ipAddress",
    },
    {
      type: "input",
      label: "对象类型：",
      placeholder: "请输入",
      prop: "objType",
    },
    {
      type: "input",
      label: "操作类型：",
      placeholder: "请输入",
      prop: "type",
    },
    {
      type: "input",
      label: "姓名：",
      placeholder: "请输入",
      prop: "name",
    },
    {
      type: "input",
      label: "姓名：",
      placeholder: "请输入",
      prop: "name",
    },
    {
      type: "input",
      label: "姓名：",
      placeholder: "请输入",
      prop: "name",
    }
  ],
  table: {
    selection: true,
    index: true,
    columnHandle: true,
    columns: [
      {
        label: "方法名称",
        prop: "methods",
      },
      {
        label: "操作类型",
        prop: "type",
      },
      {
        label: "请求参数",
        prop: "params",
      },
      {
        label: "ip地址",
        prop: "ipAddress",
      },
      {
        label: "姓名",
        prop: "name",
      },
      {
        label: "账号",
        prop: "operator",
      },
      {
        label: "响应状态",
        prop: "operateStatus",
      },
      {
        label: "菜单路径",
        prop: "menuPath",
      },
      {
        label: "操作时间",
        prop: "operatingTime",
      }
    ],
  },
})
</script>

<style></style>
